Skip to content

docs: comprehensive documentation audit with fixes#851

Closed
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sentry-cli-documentation-audit-5646
Closed

docs: comprehensive documentation audit with fixes#851
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sentry-cli-documentation-audit-5646

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented Apr 27, 2026

Documentation Audit Report

Full cross-reference of the Sentry CLI implementation code against all documentation surfaces. The audit read every command implementation, route map, distribution script, auth/config module, and plugin/skills system, then compared against README.md, DEVELOPMENT.md, the Astro doc site, and hand-written fragments.

Changes Made

Self-hosted docs (docs/src/content/docs/self-hosted.md):

  • Added SENTRY_CUSTOM_HEADERS section for proxy/IAP configuration
  • Added .sentryclirc config file section for self-hosted setups
  • Added multi-region behavior note (disabled for self-hosted)
  • Added token precedence section (SENTRY_FORCE_ENV_TOKEN)
  • Added SENTRY_FORCE_ENV_TOKEN and SENTRY_CUSTOM_HEADERS to env var table

Environment variable registry (src/lib/env-registry.ts):

  • Added SENTRY_RELEASE — used by sentry release propose-version as the highest-priority version source, but was missing from the auto-generated configuration page

Command doc fragments:

  • release.md: Added bash examples for release delete (with --yes, --dry-run) and release deploys
  • event.md: Added full "Listing Events" section with examples for event list (query, full, period, pagination, JSON)

Version accuracy (README.md, DEVELOPMENT.md, contributing.md):

  • Fixed Bun minimum version: v1.0+v1.3+ (matches packageManager: bun@1.3.13)
  • Fixed Node.js version: ≥22≥22.12 (matches engines.node)
  • Added test:unit, test:e2e, generate:docs to README scripts section
  • Added .sentryclirc mention to README Configuration section

Platform support (docs/src/content/docs/getting-started.mdx):

  • Added supported platforms table (macOS x64/arm64, Linux x64/arm64 glibc/musl, Windows x64 via Git Bash)
  • Added Alpine Linux/musl note
  • Documented SENTRY_INSTALL_DIR env var for custom install paths

DEVELOPMENT.md:

  • Added SENTRY_CONFIG_DIR to env table
  • Added link to generated configuration page for complete env var reference

Full Gap Report

The complete structured gap report is included as DOCUMENTATION_AUDIT.md at the repo root. It covers:

  • A. Undocumented commands/subcommands
  • B. Undocumented flags
  • C. Missing usage examples
  • D. Stale descriptions
  • E. Missing route mappings in skill generator (none — auto-generated)
  • F. Installation/distribution gaps
  • G. Undocumented environment variables
  • H. Auth/self-hosted gaps
  • I. Plugin/skills gaps
  • J. README/DEVELOPMENT.md drift

Top 5 Most Impactful Fixes (all addressed in this PR)

  1. SENTRY_CUSTOM_HEADERS in self-hosted docs — blocks real deployments behind proxies
  2. SENTRY_RELEASE in env registry — CI users can't discover this version override
  3. Missing bash examples for release delete/deploys and event list
  4. Bun/Node version claims — wrong minimums cause contributor build failures
  5. Platform support documentation — Windows and Alpine users have no guidance
Open in Web View Automation 

cursoragent and others added 2 commits April 27, 2026 12:12
Audit findings and fixes:
- Add SENTRY_CUSTOM_HEADERS, proxy/IAP config, .sentryclirc, multi-region,
  and token precedence sections to self-hosted docs
- Add SENTRY_RELEASE to env-registry (used by propose-version but undocumented)
- Add missing bash examples for release delete, release deploys, and event list
- Fix Bun version claims: v1.0+ → v1.3+ (matches packageManager field)
- Fix Node.js version: ≥22 → ≥22.12 (matches engines.node)
- Add platform/architecture support table to getting-started (macOS, Linux
  glibc/musl, Windows via Git Bash)
- Document SENTRY_INSTALL_DIR in getting-started
- Add SENTRY_CONFIG_DIR to DEVELOPMENT.md env table with link to full reference
- Add test:unit, test:e2e, generate:docs to README scripts section
- Add .sentryclirc mention to README Configuration section
- Include full gap report as DOCUMENTATION_AUDIT.md

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-851/

Built to branch gh-pages at 2026-04-27 12:13 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

Codecov Results 📊

6007 passed | Total: 6007 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 12882 uncovered lines.
✅ Project coverage is 75.6%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    75.56%    75.60%    +0.04%
==========================================
  Files          286       286         —
  Lines        52814     52793       -21
  Branches         0         0         —
==========================================
+ Hits         39906     39911        +5
- Misses       12908     12882       -26
- Partials         0         0         —

Generated by Codecov Action

BYK added a commit that referenced this pull request Apr 29, 2026
)

## Summary

Extend `generate-docs-sections.ts` with 7 new marker-based sections that
eliminate documentation drift by auto-generating content from source
code. Also adds missing `SENTRY_RELEASE` to the env var registry and
hand-written examples for `release delete`/`deploys` and `event list`.

Supersedes #851 with structural automation instead of manual patching
(same relationship as #739#724).

## What's auto-generated now

| Section | File | Source of Truth |
|---------|------|----------------|
| Dev prerequisites | `README.md`, `contributing.md` | `packageManager`
in `package.json` |
| Library prerequisites | `README.md` | `engines.node` in `package.json`
|
| Dev scripts | `README.md` | Curated subset (descriptions aren't
machine-readable) |
| Dev env var table | `DEVELOPMENT.md` | `env-registry.ts` entries with
`devGuide` tag |
| Self-hosted env var table | `self-hosted.md` | `env-registry.ts`
entries with `selfHosted` tag |
| Platform support | `getting-started.mdx` | Static data matching
`ALL_TARGETS` in `build.ts` |
| *(existing)* Project structure | `contributing.md` | Route tree
introspection |
| *(existing)* OAuth scopes | `DEVELOPMENT.md`, `self-hosted.md` |
`OAUTH_SCOPES` array |

## What was wrong with #851

1. **`SENTRY_CUSTOM_HEADERS` format was documented as comma-separated
`key:value`** — the actual code (`src/lib/custom-headers.ts`) uses
**semicolon-separated `Name: Value` pairs**. Would have shipped
incorrect docs.
2. **Manual fixes to driftable content** — version numbers, env var
tables, and platform support will go stale again. This PR generates them
from source code instead.
3. **Committed `DOCUMENTATION_AUDIT.md` at repo root** — a 162-line
audit report that becomes stale immediately.
4. **Manually edited skill files** — these are auto-generated from
fragments; editing them directly means the next `generate:docs`
overwrites the manual changes.

## Changes

### Source-of-truth additions
- `SENTRY_RELEASE` added to `env-registry.ts` (flows into auto-generated
`configuration.md`)
- `selfHosted` and `devGuide` tags added to `EnvVarEntry` type and
relevant entries

### Generator extensions (`script/generate-docs-sections.ts`)
- MDX marker support (`{/* GENERATED:START */}` syntax for `.mdx` files)
- `dev-prereq`: Bun version from `packageManager` field
- `library-prereq`: Node version from `engines.node`
- `dev-scripts`: Curated script list with descriptions
- `dev-env-vars`: Table from registry entries tagged `devGuide`
- `self-hosted-env-vars`: Table from entries tagged `selfHosted`, with
cross-validation
- `platform-support`: Platform/architecture table

### Fragment additions (hand-written, as designed)
- `release.md`: Examples for `release delete` (with `--yes`,
`--dry-run`) and `release deploys`
- `event.md`: Full "Listing Events" section with query, full, period,
pagination, JSON examples

### CI
- `README.md` and `getting-started.mdx` added to `check-generated`
git-diff and auto-commit lists
@BYK
Copy link
Copy Markdown
Member

BYK commented Apr 30, 2026

Addressed this in a different way in #873.

@BYK BYK closed this Apr 30, 2026
@BYK BYK deleted the cursor/sentry-cli-documentation-audit-5646 branch April 30, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants